<template>
    <div>
        <Table border :columns="columns12" :data="data6">
            <template slot-scope="{ row }" slot="name">
                <strong>{{ row.name }}</strong>
            </template>
            <template slot-scope="{ row, index }" slot="action">
                <Button type="primary" size="small" style="margin-right: 5px" @click="show(index)">查看</Button>
                <Button type="primary" size="small" style="margin-right: 5px" @click="remove(index)">审批</Button>
            </template>
        </Table>
        <Modal
                v-model="modal1"
                title="审核进度"
                @on-ok="ok"
                @on-cancel="cancel">
            <Steps :current="1">
                <Step title="已完成" content="提报申请"></Step>
                <Step title="待审核" content="区县审核"></Step>
                <Step title="待审核" content="市级审核"></Step>
                <Step title="审核通过" content="审核通过"></Step>
            </Steps>
        </Modal>
    </div>
</template>

<script>
export default {
  data () {
    return {
      modal1: false,
      columns12: [
        {
          title: '养老院名称',
          slot: 'name'
        },
        {
          title: '提报时间',
          key: 'age'
        },
        {
          title: '区县审核状态',
          key: 'address'
        },
        {
          title: '申请补贴床次数',
          key: 'people'
        },
        {
          title: '审核进度',
          slot: 'action',
          width: 150,
          align: 'center'
        }
      ],
      data6: [
        {
          name: '沈阳市天柱山（远大）老年公寓',
          age: '2019-10-11',
          address: '待审核',
          people: '10'
        },
        {
          name: '辽宁省沈阳市大东区幸福老年公寓',
          age: '2019-10-11',
          address: '待审核',
          people: '15'
        },
        {
          name: '沈阳馨颐家庭托护中心',
          age: '2019-10-11',
          address: '待审核',
          people: '12'
        },
        {
          name: '沈阳市塔湾新家园敬老院',
          age: '2019-10-11',
          address: '待审核',
          people: '8'
        }
      ]
    }
  },
  methods: {
    remove (index) {
      if (confirm('确定要通过审核吗') === true) {
        this.data6.splice(index, 1)
      }
    },
    ok () {
      this.$Message.info('Clicked ok')
    },
    cancel () {
      this.$Message.info('Clicked cancel')
    },
    show (index) {
      this.modal1 = true
      // this.$Modal.info({
      //   title: '审核进度',
      //   content: `养老院名称：${this.data6[index].name}<br>提报时间：${this.data6[index].age}<br>审核状态：${this.data6[index].address}`
      // })
    }
  }
}
</script>

<style scoped>

</style>
